#!/bin/bash
#
# - 2021-04-13 14:35:24
# - by agou
# - example: find /web/hitrader-monitoring-site7.0/ -name "*.php" -a -type f

directory=$1
grep_file=$2
str=$3

for content in `find "$directory" -name "$grep_file" -a -type f`; do
    cat $content | grep $str &> /dev/null
    REVTAL=$?
    
    if [ $REVTAL -eq 0 ]; then
        echo $content
    fi
done